Skip to content

feat: suspend scheduled scans#1520

Open
MaxRink wants to merge 2 commits into
mondoohq:mainfrom
MaxRink:feat/suspend-scheduled-scans
Open

feat: suspend scheduled scans#1520
MaxRink wants to merge 2 commits into
mondoohq:mainfrom
MaxRink:feat/suspend-scheduled-scans

Conversation

@MaxRink

@MaxRink MaxRink commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add suspend flags for scheduled Kubernetes resource, external cluster, container image, and node scan CronJobs
  • wire the suspend settings into generated CronJobs while keeping resources present
  • update CronJob reconciliation to manage spec.suspend changes
  • document suspension for upgrade-hiatus workflows and add focused tests

Tests

  • make generate manifests
  • go test ./controllers/k8s_scan ./controllers/container_image ./controllers/nodes ./pkg/utils/k8s -count=1
  • go test ./api/v1alpha2 -count=1
  • go test ./controllers/... -count=1
  • go test ./api/v1alpha2 ./pkg/utils/k8s -count=1
  • git -c core.fsmonitor=false diff --check

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@mondoo-code-review mondoo-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suspending Kubernetes resource scans will also silently suspend all external cluster scans, which may surprise users.

Comment thread controllers/k8s_scan/resources.go
Comment thread controllers/k8s_scan/resources_test.go
@MaxRink

MaxRink commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

I have read the Mondoo CLA Document and I hereby sign the CLA

mondoo-code-review[bot]
mondoo-code-review Bot previously approved these changes Jun 15, 2026

@mondoo-code-review mondoo-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation and test coverage for external cluster suspend inheritance have been improved as requested.

@MaxRink

MaxRink commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

/review

@MaxRink

MaxRink commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

recheck

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit f3f1051. ± Comparison against base commit 70733ca.

♻️ This comment has been updated with latest results.

mondoo-code-review[bot]
mondoo-code-review Bot previously approved these changes Jun 17, 2026

@mondoo-code-review mondoo-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation and CRD updates correctly describe the suspend behavior for scheduled scans.

@mondoo-code-review mondoo-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds suspend fields to pause scheduled scan CronJobs across all scan types without deleting resources.

mondoo-code-review[bot]
mondoo-code-review Bot previously approved these changes Jun 17, 2026

@mondoo-code-review mondoo-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI-only change downgrades spell-check action from v0.0.26 to v0.0.25; no functional code impact.

@mondoo-code-review mondoo-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds suspend fields to pause scheduled scan CronJobs without deleting resources.

Comment thread .github/actions/link-check/config.json Outdated
@MaxRink MaxRink marked this pull request as draft June 19, 2026 06:13
@MaxRink MaxRink marked this pull request as ready for review June 19, 2026 08:15
@MaxRink MaxRink force-pushed the feat/suspend-scheduled-scans branch from f8161cf to f3f1051 Compare June 19, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant